# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Tom Gundersen <teg@jklm.no>
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: Lawrence Lee <valheru@facticius.net>

pkgname=rasqal
epoch=1
pkgver=0.9.33
pkgrel=4
pkgdesc="A library handling RDF query syntaxes, construction and execution"
url="http://librdf.org/rasqal"
license=('LGPL2.1')
arch=('x86_64')
depends=('glibc' 'libgcrypt' 'libgpg-error' 'mpfr' 'pcre')
makedepends=('raptor' 'util-linux')
provides=('librasqual.so')
source=(http://download.librdf.org/source/${pkgname}-${pkgver}.tar.gz{,.asc})
sha512sums=('05728682797470db9e51d156012e8fde9dec1554d107372faa11cbe6cdc3356e92386f4f8de6d7c41e3100b76f9b1c6809102a913829cddbd2ff29043c04d522'
            'SKIP')
b2sums=('87bca86b2f0dceb0801f5a34dae9ae1f87d8a7d0dc1e03fdf04998a0d4885ed76be2719d3e01489a5510a26715bb093a75ce194cc42f3cedff88f64161d6a2fb'
        'SKIP')
validpgpkeys=('F879F0DEDA780198DD08DC6443EC92504F71955A') # Dave Beckett <dave@dajobe.org>

prepare() {
  cd "${pkgname}-${pkgver}"
  autoreconf -vfi
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
              --disable-static \
              --enable-release
  make
}

check() {
  cd "${pkgname}-${pkgver}"
  make -k check || true # still fails some checks
}

package() {
  depends+=('libraptor2.so' 'libuuid.so')
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -vDm 644 {ChangeLog*,README,NEWS} \
    -t "${pkgdir}/usr/share/doc/${pkgname}/"
}
